﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain.Core.Specification;
using Domain.MainModule.Entities;


namespace Domain.MainModule.BillingInformations
{
    public class BillingInformationGroupBranchIdSpecification: Specification<BillingInformation>
    {
        private Guid _groupBranchId;

        public BillingInformationGroupBranchIdSpecification(Guid groupBranchId)
        {
            this._groupBranchId = groupBranchId;
        }

        public override System.Linq.Expressions.Expression<Func<BillingInformation, bool>> SatisfiedBy()
        {
            Specification<BillingInformation> spec = new TrueSpecification<BillingInformation>();

            spec &= new DirectSpecification<BillingInformation>(c => c.GroupBranchId == this._groupBranchId);

            return spec.SatisfiedBy();
        }
    }
}
